//
//  BKHeZhaoViewController.m
//  baokaodaxue
//
//  Created by dangyangyang on 15/6/3.
//  Copyright (c) 2015年 宏图教育. All rights reserved.
//

#import "BKHeZhaoViewController.h"
#import "BKHeZhaoFlowLaout.h"
#import "BKHeZhaoCollectionViewCell.h"
#import "BKHeZhaoStep01ViewController.h"
@interface BKHeZhaoViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (weak, nonatomic) IBOutlet UICollectionView *collectView;

@end
static NSString *collectR = @"RRRR";
@implementation BKHeZhaoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [_collectView registerNib:[UINib nibWithNibName:NSStringFromClass([BKHeZhaoCollectionViewCell class]) bundle:nil] forCellWithReuseIdentifier:collectR];
    
    BKHeZhaoFlowLaout *layot = [[BKHeZhaoFlowLaout alloc] init];
    [_collectView setCollectionViewLayout:layot];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/


- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{

    BKHeZhaoCollectionViewCell *cel = [collectionView dequeueReusableCellWithReuseIdentifier:collectR forIndexPath:indexPath];
    
    cel.iamgeView.image = [UIImage imageNamed:@"shizi"];
   
    return cel;
}

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{

    return 100;
}

- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{

    return CGSizeMake(60, 60);
}
- (IBAction)p_back:(id)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (IBAction)p_edit:(id)sender {
        BKHeZhaoStep01ViewController *hezhao1 = [[BKHeZhaoStep01ViewController alloc] initWithNibName:NSStringFromClass([BKHeZhaoStep01ViewController class]) bundle:nil];
        [self presentViewController:hezhao1 animated:YES completion:nil];

    
}

- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)
section{
    
    
    return UIEdgeInsetsMake(0, 0, 0, 0);

}


@end
